﻿<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/Admin/PMAdmin.Master"
    CodeBehind="BankOverview.aspx.cs" Inherits="PM.Site.Admin.BankOverview" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div class="form_left" style="width:720px;">
        <asp:Panel ID="pnlBanks" runat="server" Font-Size="Medium" GroupingText="Overview Banks">
            <div style="padding: 5px;">
                <asp:DataList ID="dlBanks" DataKeyField="BankId" runat="server" Visible="true" RepeatDirection="Horizontal"
                    CellPadding="0" CellSpacing="0" Font-Size="Small" ItemStyle-BackColor="#F6F4F5"
                    ItemStyle-BorderColor="#6B6B6B" ItemStyle-BorderWidth="1px" HeaderStyle-BackColor="#444444"
                    HeaderStyle-Height="30px" RepeatColumns="1" RepeatLayout="Flow" OnItemCommand="dlBanks_ItemCommand">
                    <AlternatingItemStyle BackColor="#F9F9F9" />
                    <HeaderTemplate>
                        <div style="padding-bottom: 0px; height: 30px; margin: 0px; color: White;">
                            <div style="width: 102px; float: left; text-align: center; font-weight: bold;">
                                Bank Id</div>
                            <div style="width: 200px; float: left; text-align: center; font-weight: bold;">
                                Name</div>
                            <div style="width: 250px; float: left; text-align: center; font-weight: bold;">
                                Branch</div>
                            <div style="width: 70px; float: left; text-align: center; font-weight: bold;">
                                Edit</div>
                            <div style="width: 60px; float: left; text-align: center; font-weight: bold;">
                                Delete</div>
                        </div>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <div style="float: none; margin-bottom: 0px; min-height: 15px; font-size: small;
                            text-align: center;">
                            <div style="width: 100px; float: left; min-height: 12px;">
                                <label>
                                    <%# Eval("BankId")%></label></div>
                            <div style="width: 200px; float: left; min-height: 12px;">
                                <label>
                                    <%# Eval("Name")%></label></div>
                            <div style="width: 250px; float: left; min-height: 12px;">
                                <label>
                                    <%# Eval("Branch")%></label></div>
                            <div style="width: 70px; text-align: center; vertical-align: top; float: left;">
                                <asp:ImageButton ID="imgEdit" CommandName="EditBank" CommandArgument='<%# Eval("BankId")%>'
                                    ImageUrl="~/Images/Edit.gif" runat="server" AlternateText="Edit Bank" /></div>
                            <div style="width: 60px; text-align: center; vertical-align: top; float: left;">
                                <asp:ImageButton ID="imgDelete" CommandName="DeleteBank" CommandArgument='<%# Eval("BankId")%>'
                                    ImageUrl="~/Images/Delete.gif" runat="server" AlternateText="Delete Bank" OnClientClick="return confirm('Are you sure you want to delete this bank?')" />
                            </div>
                        </div>
                    </ItemTemplate>
                </asp:DataList>
            </div>
        </asp:Panel>
    </div>
    <div class="form_left" style="margin-left:10px;">
        <asp:Panel ID="pnlAddBank" runat="server" GroupingText="Add New Bank" Font-Size="Medium">
            <div style="text-align: left;">
                <asp:ValidationSummary ID="valsBankDetails" runat="server" ValidationGroup="g1" />
            </div>
            <table style="font-size: smaller;" id="div_left">
                <tr>
                    <td style="width: 100px">
                        *Bank Id
                    </td>
                    <td>
                        :
                        <asp:TextBox ID="txbBankId" CssClass="to_upper_case" runat="server" TextMode="SingleLine" t></asp:TextBox>
                        <asp:RequiredFieldValidator ID="valBankId" runat="server" ErrorMessage="Please enter the Bank Id"
                            ControlToValidate="txbBankId" Display="Dynamic" SetFocusOnError="True" ValidationGroup="g1">*</asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td>
                        Name
                    </td>
                    <td>
                        :
                        <asp:TextBox ID="txbName" runat="server" TextMode="SingleLine"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        Branch
                    </td>
                    <td>
                        :
                        <asp:TextBox ID="txbBranch" runat="server" TextMode="SingleLine"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                    </td>
                    <td style="text-align:right;">
                        <asp:Button ID="btnSave" runat="server" Text="Save" OnClick="btnSave_Click" ValidationGroup="g1" />
                    </td>
                </tr>
            </table>
        </asp:Panel>
    </div>
</asp:Content>
